package com.groupseven.backend.services;

import com.groupseven.backend.domain.Program.Manager;
import com.groupseven.backend.domain.Program.Program;
import com.groupseven.backend.domain.Program.ProgramApplication;
import com.groupseven.backend.domain.Program.TeamMember;

import java.util.List;
import java.util.Map;

public interface ProgramService {
    /**
     * @Author 王志华
     * 通过传入Program类型修改项目信息
     * @param program Program类型
     * @return Program类型
     */
    int modifyByProgramNumber(Program program);

    /**
     * @Author 王志华
     * 通过传入Program类型查询Program类型中相应Manager的项目
     * @param pro Program类型
     * @return Program列表
     */
    List<Program> selectByManager(Program pro);

    /**
     * @Author 王志华
     * 通过传入Program类型判断该项目是否存在
     * @param program Program类型
     * @return 1代表存在0代表不存在
     */
    int isProgramExits (Program program);

    /**
     * @Author 王志华
     * 通过传入Program类型实现插入项目信息
     * @param program Program类型
     * @return 1代表插入成功0代表插入失败
     */
    int insertProgramInfo(Program program);

    /**
     * @Author 王志华
     */
    List<Program> selectAllPrograms();

    /**
     * @Author 王志华
     */
    List<ProgramApplication> findAllProgamApplicationInfo();

    /**
     * @Author 王志华
     */
    List<ProgramApplication> setManagerAndTeamMembers(List<ProgramApplication> applications);

    /**
     * @Author 王志华
     */
    int insertProgramApplication(ProgramApplication application);

    /**
     * @Author 王志华
     */
    int insertManagerForApplication(Manager manager);

    /**
     * @Author 王志华
     */
    int insertTeamMemberForApplication(TeamMember member);
    /**
     * @Author 王志华
     */
    ProgramApplication findProgramNumberFromProgramApplication(String ProgramNumber);

    /**
     * @Author 王志华
     */
    String findMaxProgramNumberFromProgramApplication();
    /**
     * @Author 王志华
     */
    int deleteByProgramNumbers(List<String> str);

    /**
     * @Author 王志华
     * @param str
     * @return
     */
    int deleteByProgramNumber(String str);

    /**
     * @Author 王志华
     * @param query
     * @return
     */
    int multipleDelete(Map<String,Object> query);

    /**
     * @Author 王志华
     * @return
     */
    List<ProgramApplication> findUnreviewed();

    /**
     * @Author 王志华
     * @return
     */
    List<ProgramApplication> findReviewed();

    /**
     * @Author 王志华
     * @return
     */
    List<Program> FuzzySearch(String query);

    int updateProgramApplicationByProgramNumber(String ProgramNumber);

    int updateManagerForApplication(String ProgramNumber);

    int updateTeamMemberForApplication(String ProgramNumber);

    int deleteProgramApplicationByProgramNumber(String ProgramNumber);

    int deleteManagerForApplication(String ProgramNumber);

    int deleteTeamMemberForApplication(String ProgramNumber);

    List<ProgramApplication> getMyProgramApplications(String Username);

    int passFirstReview(String number);

    int denyFirstReview(String number);

    int passSecondReview(String Number ,String Level);

    int denySecondReview(String Number );

    List<Program> FuzzySearchMyPrograms(String Username,String query);

}
